package com.firefightingiot.firefightingiot.web.mapper.statistics;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.firefightingiot.firefightingiot.model.statistics.*;
import com.firefightingiot.firefightingiot.web.domain.DeviceAlarmLogDo;
import com.firefightingiot.firefightingiot.web.domain.DeviceAlarmSmallLogDo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface DeviceAlarmLogAllStatisticsWeekMapper extends BaseMapper<DeviceAlarmLogAllStatisticsWeek> {

    /**
     * 获取往前七天或当月或今天的所有日志统计
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmLogDo> getAllLogForStatistics(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (所有统计表中) <br>
     * @author 石延杰<br>
     * @param params
     */
    void insertZB(JSONObject jsonParam);
    void insertZBM(JSONObject jsonParam);

    /**
     * 获取往前七天或当月或今天的日志统计：根据报警类型
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmLogDo> getLogByAlarmTypeForStatistics(JSONObject jsonParam);
    /**
     * 获取往前七天或当月或今天的日志统计：设备类型
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmLogDo> getLogByDeviceTypeForStatistics(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (电气火灾) <br>
     * @author 石延杰<br>
     * @param params
     */
    void insertEleZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (充电桩安全) <br>
     * @author 石延杰<br>
     * @param params
     */
    void insertChargingStationZB(JSONObject jsonParam);

    /**
     *
     * @Title: insertZB <br>
     * @Description: (可燃气体) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertGasZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (自动联网) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertAutoNetworkZB(JSONObject jsonParam);

    /**
     *
     * @Title: insertZB <br>
     * @Description: (建筑消防用水) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertWaterZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (烟感) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertSmokeZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (可视化) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertVisZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (灭火器) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertFireExtinguisherZB(JSONObject jsonParam);
    /**
     *删除统计周表的数据：7天前及以更早的数据删除
     */
    void deleteStatisticsForWeek(JSONObject jsonParam);
    /**
     *删除统计月表的数据：上个月的全部删除
     */
    void deleteStatisticsForMonth(JSONObject jsonParam);
    /**
     *删除今日表中的昨日的数据
     */
    void deleteTodayLog(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (水泵) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertWaterPumpZB(JSONObject jsonParam);
    /**
     *
     * @Title: insertZB <br>
     * @Description: (水浸) <br>
     * @author 石延杰<br>
     * @param jsonParam
     */
    void insertWaterImmersionZB(JSONObject jsonParam);

    /**
     * 获取往前七天或当月或今天的所有日志统计:只有小的那层
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmSmallLogDo> getAllLogForStatisticsTwo(JSONObject jsonParam);
    /**
     * 获取往前七天或当月或今天的日志统计：根据报警类型:只有小的那层
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmSmallLogDo> getLogByAlarmTypeForStatisticsTwo(JSONObject jsonParam);
    /**
     * 获取往前七天或当月或今天的日志统计：设备类型:只有小的那层
     * @param jsonParam
     * @return
     */
    List<DeviceAlarmSmallLogDo> getLogByDeviceTypeForStatisticsTwo(JSONObject jsonParam);
    /**
     * 通过周总分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromAllWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周电分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromEleWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周水分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromWaterWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周烟感分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromSmokeWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周燃气分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromGasWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周自动联网分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromAutoNetworkWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周可视化分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromVisWeekStatistics(JSONObject jsonParam);
    /**
     * 通过周灭火器分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromFireExtinguisherWeekStatistics(JSONObject jsonParam);
    /**
     * 通过水泵分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromWaterPumpWeekStatistics(JSONObject jsonParam);
    /**
     * 通过水泵分析表获取数据
     * @param jsonParam
     * @return
     */
    List<Map<String, Object>> getFromWaterImmersionCountWeekStatistics(JSONObject jsonParam);
    /**
     * 全部周数据
     */
    List<DeviceAlarmLogAllStatisticsWeek> deviceAlarmLogAllStatisticsDateWeekList();
    List<DeviceAlarmLogAllStatisticsWeek> deviceAlarmLogAllStatisticsWeekList(String orgId);
    List<DeviceAlarmLogAllStatisticsWeek> deviceAlarmLogAllStatisticsBusinessWeekList(String businessId);

    /**
     * 消防用水周数据
     */
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsDateWeekList();
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsWeekList(String orgId);
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsBusinessWeekList(String businessId);

    /**
     * 消防用水月数据
     */
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsDateMonthList();
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsMonthList(String orgId);
    List<DeviceAlarmLogFireWaterStatisticsWeek> deviceAlarmLogWaterStatisticsBusinessMonthList(String businessId);


    /**
     * 烟感周数据
     */
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsDateWeekList();
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsWeekList(String orgId);
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsBusinessWeekList(String businessId);


    /**
     * 烟感月数据
     */
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsDateMonthList();
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsMonthList(String orgId);
    List<DeviceAlarmLogSmokeStatisticsWeek> deviceAlarmLogSmokeStatisticsBusinessMonthList(String businessId);


    /**
     * 燃气周数据
     */
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsDateWeekList();
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsWeekList(String orgId);
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsBusinessWeekList(String businessId);


    /**
     * 燃气月数据
     */
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsDateMonthList();
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsMonthList(String orgId);
    List<DeviceAlarmLogGasStatisticsWeek> deviceAlarmLogGasStatisticsBusinessMonthList(String businessId);


    /**
     * 自动联网周数据
     */
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsDateWeekList();
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsWeekList(String orgId);
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsBusinessWeekList(String businessId);

    /**
     * 自动联网月数据
     */
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsDateMonthList();
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsMonthList(String orgId);
    List<DeviceAlarmLogAutoNetworkStatisticsWeek> deviceAlarmLogAutoNetStatisticsBusinessMonthList(String businessId);


    /**
     * 可视化周数据
     */
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsDateWeekList();
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsWeekList(String orgId);
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsBusinessWeekList(String businessId);

    /**
     * 可视化月数据
     */
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsDateMonthList();
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsMonthList(String orgId);
    List<DeviceAlarmLogVisualizationStatisticsWeek> deviceAlarmLogVisualizationStatisticsBusinessMonthList(String businessId);


    /**
     * 灭火器周数据
     */
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsDateWeekList();
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsWeekList(String orgId);
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsBusinessWeekList(String businessId);


    /**
     * 灭火器月数据
     */
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsDateMonthList();
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsMonthList(String orgId);
    List<DeviceAlarmLogFireExtinguisherStatisticsWeek> deviceAlarmLogFireExtinguisherStatisticsBusinessMonthList(String businessId);


    /**
     * 水泵周数据
     */
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsDateWeekList();
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsWeekList(String orgId);
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsBusinessWeekList(String orgId);

    /**
     * 水泵月数据
     */
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsDateMonthList();
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsMonthList(String orgId);
    List<DeviceAlarmLogWaterPumpStatisticsWeek> deviceAlarmLogWaterPumpStatisticsBusinessMonthList(String orgId);

    /**
     * 充电桩周数据
     */
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsDateWeekList();
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsWeekList(String orgId);
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsBusinessWeekList(String businessId);

    /**
     * 充电桩月统计
     */
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsMonthDateList();
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsMonthList(String orgId);
    List<DeviceAlarmLogChargingStationStatisticsWeek> deviceAlarmLogChargingStationStatisticsBusinessMonthList(String businessId);

}
